package com.app.main;

import com.app.common.Const;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;

public class BestSellerCategory extends Activity implements OnClickListener {
	protected void onCreate(Bundle savedInstanceState) {
	      super.onCreate(savedInstanceState);
	      setContentView(R.layout.bestsellercategory);
	      
	      View domesitc = this.findViewById(R.id.domestic);
	      domesitc.setOnClickListener(this);
	      
	      View abroad = this.findViewById(R.id.abroad);
	      abroad.setOnClickListener(this);
   }
	
	
	public void onClick(View v){
    	Intent intent = null;
    	
    	switch(v.getId()){
	    	case R.id.domestic  :
	    		  intent = new Intent(BestSellerCategory.this, BestSeller.class);
	    		  intent.putExtra("category", Const.DOMESTIC) ;
	    	      startActivity(intent);
	    	      overridePendingTransition(R.anim.zoom_enter, R.anim.zoom_exit);
	    	break;
    	
	    	case R.id.abroad  :
	    		  intent = new Intent(BestSellerCategory.this, BestSeller.class);
	    		  intent.putExtra("category", Const.ABROAD) ;
	    	      startActivity(intent);
	    	      overridePendingTransition(R.anim.zoom_enter, R.anim.zoom_exit);
	    	break;
    	
    	}
    }
}
